<div id="content">
<?php
	$name = EbController::$request->getData("urlname");
	
	$boutique 	= EbModel::getModel("VarPeople","Boutique")->selectProfileFromUrl($name);
		
	if (is_null($boutique))
	{
		echo "<p style='margin:auto;color:red;font-weight:bold;'>Nous sommes désolé, mais la boutique que vous recherchez n'existe pas!</pa></div>";
	}
	else
	{		
		EbModel::getModel("VarPeople","Boutique")->update((object) array('bo_id' => $boutique->bo_id,'hits' => $boutique->hits + 1));
		
		$medias		= EbModel::getModel('Media','Media')->selectByFolder($boutique->mediafolder_id);
	?>
	<div>
		<h2 class="vp-title">Bienvenue sur la boutique <?PHP echo $boutique->name;?></h2>
		<p><a href="/annuaire">Annuaire</a> --- <a href="/categorie/<?php echo $boutique->urlcategorie;?>"><?php echo $boutique->categorie;?></a> --- 
		</p>
	</div>
		<a name="Information"></a>
	<div>
		<h3>Activité :</h3>
		<?PHP echo $boutique->activity;?>
		<br/>	<br/>	<br/>
	
		<h3>Description :</h3>
		<?PHP echo $boutique->description;?>
		<br/>	<br/>	<br/>
		
		<h3>Contact :</h3>
		<?PHP echo $boutique->contact;?>
		<br/>	<br/>	<br/>
	</div>
	<a name="Plan"></a>
	<h2>Plan:</h2>
	
	<?php eb_widget('component',array('module' => 'GoogleMaps','file' => 'MapPointsListing','listPoints' => array($boutique))); ?>
		
	<a name="Photos"></a>
	<h2>Photos:</h2>
	
	<?php eb_widget('flash',array('module' => 'Media','file' => 'flashgallery','width' => 400,'height' => 400, 'variables' => array('color_path' => '/modules/Media/v/gallerySettings.xml','script_path' => '/Media/model-media/selectByFolderForGallery.xml','content_path' => $boutique->mediafolder_id))); ?>

</div>
<div id="sidebar">
	<div class="vp-menu" id="menuToScroll">
		<ul>
			<li><a href="#Information">Information</a></li>
			<li><a href="#Photos">Photos</a></li>
			<li><a href="#Plan">Plan d'accès</a></li>
			<li><a href="#Contact">Contact</a></li>
		</ul>
	</div>
</div>
<script type="text/javascript">

var timerIndex;

$(window).scroll(function() 
{
	clearTimeout(timerIndex);
    timerIndex = setTimeout(scrollFollow,100);
});

function scrollFollow()
{
	$('#menuToScroll').animate({marginTop: $(window).scrollTop() + "px"},200);
}

</script>
<?php
}
?>